third-party-prc-api
Get Customer Cash Flows
URLS:
Description : This API will return the cash flows of a customer by getting customer id as input query parameter. The EXP api will call the backend PRC layer and the process layer will request the PostgreSQL SYS layer with the query and customer id in the input parameter section, SYS layer will call the backend PostgreSQL DB server to get the cash flow data from table.
Channels can consume Mulesoft’s REST API exposed as an experience API.
Mulesoft Request:
Mandatory Headers: client_id, client_secret, x-channel-id, x-correlation-id, x-bank-id
Optional Headers: Authorization, x-user-id, x-sub-channel-id, x-debug-flag, x-customer-id
URI Parameter
FieldName | DataType | Required? | Length | sample | Description |
---|---|---|---|---|---|
id | string | Yes | Min 2 Max 50 | 12346789 | Represents unique identifier number of a customer |
Mulesoft Response:
Success Response: (200)
Response Body: application/json
Field Name | Type | Occurrence | Description |
---|---|---|---|
status | Object | Mandatory | |
success | Boolean | Mandatory | true/false |
code | String | Mandatory | “0” incase of success or Error Code |
reasonCode | String | Optional | Add this tag only incase of error |
arabicMessage | String | Mandatory | in case of success or arabic translated error in case of known errors |
englishMessage | String | Mandatory | “The Operation has been Successfully Completed” Or error Description |
End of status | |||
response | Object | Mandatory | Present if success = true |
customerCashFlow | Array | Mandatory | Recurring object inside array |
bankId | String | Optional Mandatory | |
referenceDate | datetime | Optional | |
statementId | String | Mandatory | |
customerId | String | Mandatory | |
customerIdFs | String | Optional | |
finstType | String | Optional | |
finstStructure | String | Optional | |
finstOff | String | Optional | |
finstStartDate | datetime | Optional | |
finstEndDate | datetime | Optional | |
cashField | String | Optional | |
fieldValue | String | Optional | |
End of ' customerCashFlow ' | |||
End of ' response ' |
Sample Response
{
"status": {
"success": true,
"code": "200",
"arabicMessage": "تمت العملية بنجاح",
"englishMessage": "The Operation has been Successfully Completed"
},
"response": {
"customerRating": [
{
"nblines": 1,
"customerId": "2001709",
"referenceDate": "2019-09-12",
"ratingModelSegmentId": "FA_SME_R",
"officialityId": "OFFICIAL",
"ratingTypeId": "WarningSignals",
"ratingStatusId": "VALID",
"grade": "",
"pd": "",
"name": "ALRIYAD INTERNATIONAL TRADING"
},
{
"nblines": 1,
"customerId": "2001709",
"referenceDate": "2019-09-12",
"ratingModelSegmentId": "FA_SME_R",
"officialityId": "OFFICIAL",
"ratingTypeId": "SC-SEC-4",
"ratingStatusId": "VALID",
"grade": "",
"pd": "",
"name": "ALRIYAD INTERNATIONAL TRADING"
}
]
}
}
Sample Error Response:
Error codes :
400:
content-type: JSON
{
"status": {
"success": false,
"code": "400",
"reasonCode": "BadRequest",
"arabicMessage": "",
"englishMessage": "No records were found that matched the selection criteria",
"backendError": "",
"backendCode": ""
}
}